const app = getApp();

Component({
  properties: {
    title:{
      type:String,
      value:''
    },
    holder: {
      type: String,
      value: ''
    },
    parentFunction: {
      type: String,
      value: ''
    }
  },
  data: {
    showConfirm:false,
    attrs:[]
  },

  ready: function () {
  },
  methods: {
    init:function(){
      var that = this
      that.setData({
        showConfirm: true,
      })
    },
    setValue: function (e) {
      this.setData({
        content: e.detail.value
      })
    },
    cancel: function () {
      var that = this
      that.setData({
        showConfirm: false,
      })
    },
    confirmAcceptance: function () {
      var that = this
      that.setData({
        showConfirm: false,
      })
      this.triggerEvent(this.data.parentFunction,{content:this.data.content});
      this.setData({
        content: ''
      })
    },
  }
})